package com.itheima.work1113;

public class Test {
    public static void main(String[] args) {
        // 创建两个学生对象
        Student stu1 = new Student("小明", 18, "男");
        Student stu2 = new Student("小明", 12, "男");

        // 打印学生对象内容
        System.out.println(stu1);
        System.out.println(stu2);
        // 比较内容
        if (stu1.equals(stu2)==true) {
            System.out.println("是相同的");
        }else {
            System.out.println("不是相同的");
        }
    }
}
